<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<jsp:include page="Redir.jsp"></jsp:include>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<link href="<c:url value='/css/default.css'/>" rel="stylesheet" type="text/css"/>
<head>
<script language="JavaScript" src="scripts/date.js"></script>
<fmt:setBundle basename="lang.message" />
<title><fmt:message key="showpublicholiday.title" /></title>
</head>
<body>
<%@include file="Header.jsp" %>
<div id="wrapper">	
    <div id="page-wrapper">
		<div id="page">
		<%@include file="Menu.jsp" %>		
			<div id="content">
				<div> 
 		<h2>
<fmt:message  key="label.publicholiday"/></h2>
<c:url var="inserturl" scope="page" value="/ProcessPublicHoliday">
	<c:param name="action" value="insert" />
</c:url>
<a href="${inserturl}"><fmt:message key="publicholiday.add"/></a>
<br/><br/>
<table class="table-view">
<tr>
<th>#</th>
<th><fmt:message key="label.publicholiday.startdate"></fmt:message></th>
<th><fmt:message key="label.publicholiday.enddate"></fmt:message></th>
<th><fmt:message key="label.publicholiday.description"></fmt:message></th>
<th>
<fmt:message key="general.edit">
</fmt:message></th><th>
<fmt:message key="general.delete">
</fmt:message>
</th>

</tr>
<c:forEach var="publicholiday" items="${publicholidays}" varStatus="status" >
<tr class="${status.index%2==0?'even':'odd'}">
<td class="id">${status.index+1}</td>
<td>${publicholiday.startdate}</td>
<td>${publicholiday.enddate}</td>
<td>${publicholiday.description}</td>
<td class="edit">
<fmt:formatDate value="${publicholiday.startdate}" pattern="dd-MMM-yyyy" var="startD" />

<c:url var="updateurl" scope="page" value="/ProcessPublicHoliday">
	<c:param name="startdate" value="${startD}" />

	<c:param name="action" value="edit" />
</c:url>
<a href="${updateurl}">
<fmt:message key="general.edit">
</fmt:message>
</a>
</td>                        
<td class="delete">
<fmt:formatDate value="${publicholiday.startdate}" pattern="dd-MMM-yyyy" var="fDate" />
<c:url var="deleteurl" scope="page" value="/DeletePublicHoliday">
	<c:param name="startdate" value="${fDate}" />
</c:url>
<a href="${deleteurl}">
<fmt:message key="general.delete">
</fmt:message>
</a>
</td>
</tr>
</c:forEach>
</table>
</div>
			</div>
       </div>
	</div>
</div>
	<%@include file="Footer.jsp" %>
</body>
</html>